package com.g13.virtualpethospital.service;

import com.g13.virtualpethospital.entity.TestExamEntity;
import com.g13.virtualpethospital.exceptions.TestExamException;

import java.util.List;

/**
 * @Title: TestExamService
 * @Author yyj1205
 * @Package com.g13.virtualpethospital.service
 * @Date 24/3/2024 21:29
 * @description: 考试记录的服务
 */
public interface TestExamService {
    /**
     * 添加一次考试记录
     * @param testExam
     */
    public void addTestExam(TestExamEntity testExam);

    /**
     * 编辑考试记录
     * @param testExam
     * @param id
     */
    public void updateTestExam(TestExamEntity testExam, String id) throws TestExamException;

    /**
     * 删除考试记录
     * @param id
     */
    public void deleteTestExam(String id) throws TestExamException;
    /**
     * 查找所有考试记录
     * @return
     */
    public List<TestExamEntity> findAllTestExam();

    /**
     * 按照考试记录id查找考试记录
     * @return
     */
    public List<TestExamEntity> findTestExamById(String id);

    /**
     * 按照用户id返回考试记录,留空视为不做筛选
     * @return
     */
    public List<TestExamEntity> findTestExamByUserId(String userId);

    /**
     * 按照试卷id返回考试记录，留空视为不做筛选
     * @param paperId
     * @return
     */
    public List<TestExamEntity> findTestExamByPaperId(String paperId);
}
